package com.dh.blog.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.dh.blog.utils.Constraints;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;

/**
 * 分页vo
 * @author David
 *
 */
@JsonInclude(Include.NON_EMPTY)
public class PagerVo implements Serializable{
	/**
	 * serializeId
	 */
	private static final long serialVersionUID = 1149864926745645737L;
	public static final int RANGE = 5;
	private int offset= -1;
	private int size = Constraints.DEFAULT_PAGE_SIZE;
	private int total = 0;
	/**
	 * 排序方式(0:升序,1:降序)
	 */
	private int order = 0;
	/**
	 * 排序字段/属性
	 */
	private String sort = null;
	private List<Object> datas = new ArrayList<Object>();
	/**
	 * 确定显示页面的范围
	 */
	private int begin = 1;
	private int end = 1;
	private int num = 1;//当前页面号
	private int pages = -1;//总页面数
	public int getOffset() {
		return offset;
	}
	public void setOffset(int offset) {
		this.offset = offset;
	}
	public int getSize() {
		return size;
	}
	public void setSize(int size) {
		this.size = size;
	}
	public int getTotal() {
		return total;
	}
	public void setTotal(int total) {
		this.total = total;
	}
	public List<Object> getDatas() {
		return datas;
	}
	public void setDatas(List<Object> datas) {
		this.datas = datas;
	}
	public int getOrder() {
		return order;
	}
	public void setOrder(int order) {
		this.order = order;
	}
	public String getSort() {
		return sort;
	}
	public void setSort(String sort) {
		this.sort = sort;
	}
	public int getBegin() {
		return begin;
	}
	public void setBegin(int begin) {
		this.begin = begin;
	}
	public int getEnd() {
		return end;
	}
	public void setEnd(int end) {
		this.end = end;
	}
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	public int getPages() {
		return pages;
	}
	public void setPages(int pages) {
		this.pages = pages;
	}
}
